package com.asset.dispoal.menu.domain.db.mapper;

import com.asset.dispoal.menu.domain.db.entity.GbMenuDo;
import com.asset.dispoal.role.domain.db.entity.GbRoleDo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import tech.mhuang.pacebox.springboot.core.mapper.BaseMapper;

import java.util.List;

/**
 * 菜单表JDBC接口
 *
 * @author: mhuang
 * @date: 2022-02-25 15:34:43
 */
@Mapper
public interface GbMenuMapper extends BaseMapper<GbMenuDo, String> {


    /**
     * 修改菜单状态
     *
     * @param ids
     * @param select
     */
    void updateSelectMenu(@Param("ids") List<String> ids, @Param("select") String select);


    List<String> queryMenuByCompany(@Param("companyType") String companyType, @Param("companyId") String companyId);


    List<String> queryDefaultMenuByRole(@Param("roleId") String roleId);

    void saveCompanyMenu(@Param("list") List<String> list, @Param("companyId") String companyId);

    List<GbMenuDo> queryDefaultMenuByCompanyId(@Param("companyId") String companyId);


    List<GbMenuDo> queryDefaultMenuByCompanyType(@Param("companyType") String companyType);


    GbRoleDo queryDefaultRole(@Param("companyType") String companyType);

    List<String> queryMenuByRole(@Param("roleIds") List<String> roleId);


    List<GbMenuDo> findMenuByCompanyId(@Param("companyId") String companyId);
}